<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCityTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('city', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',20)->comment('城市名称');
            $table->integer('provinceid')->comment('省份id');
            $table->string('letter', 4)->comment('首字母');
            $table->decimal('agentratio', 6, 2)->default(0.00)->comment('红包代理商比例');
            $table->decimal('hqratio', 6, 2)->default(0.00)->comment('红包总部比例');
            $table->decimal('ratio', 6, 2)->default(0.00)->comment('红包比例');
            $table->integer('validdays')->default(0)->comment('红包有效天数');
            $table->integer('adminid', 11)->default(0)->comment('操作人id');
            $table->tinyInteger('status')->default(1)->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('city');
    }
}
